-
Notifications
You must be signed in to change notification settings - Fork 3.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Don't error (only warn) on symbol literals under -Xsource:3 #9602
Conversation
Scala 3 still supports symbol literals even if they require a language import now (cf scala/scala3#11588), so don't emit an error if we find one under -Xsource:3 as that could unnecessarily impede cross-compilation as discovered in scala/scala-dev#769.
(I won't have time to think about this until next week, but in the meantime I ask it not be merged because I want to think and respond.) |
Probably it's useful to backport the language import under That sounds baroque, but this conundrum about symbol lits may be where the language import shines. |
That does sound ideal. |
Yeah, but forward bincompat means that likely can't be done without significant custom compiler magic. |
The tension here is that |
More thinking out loud: maybe we should be considering using |
IMO, deprecation warnings already serve purpose 2 well enough. |
I'm surprised to see the language vals are not marked compileTimeOnly. The compiler writer's go-to is always "significant custom compiler magic". :) oh, I just used "go-to" in a non-computer sense. Since anyone using |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm totally down for this. -Xsource:3
is "Scala 3 lite", not Scala 3 proper, so we can leave Scala 3 to enforce as and when (and/or under what flag) things are hard failures.
okay, I'm convinced not supporting the language import makes me sad, though. I guess that forces cross-builders to add the language import via |
Yes that's what I had in mind. And maybe the language import can be added in scala 2 later in some fashion. |
Scala 3 still supports symbol literals even if they require a language
import now (cf scala/scala3#11588), so don't
emit an error if we find one under -Xsource:3 as that could
unnecessarily impede cross-compilation as discovered in
scala/scala-dev#769.